import { defineStore } from 'pinia'

export const useUserStore = defineStore('user', {
  state: () => ({
    username: 'yu liang',
    level: 0,
    xp: 5,
    maxXp: 50,
    streakCount: 1,
    points: 0,
    coins: 0
  }),
  actions: {
    updateXp(amount: number) {
      this.xp = Math.min(this.xp + amount, this.maxXp)
    }
  }
}) 